package com.xiongtian.springframework.aop;

import java.lang.reflect.Method;

/**
 * @Author: xiongtian
 * @CreateTime: 2025-04-18  15:43
 * @Version: 1.0
 * @Description: 方法前置通知
 * <p>
 * 主要是用于把代理、拦截、匹配的各项属性包装到一个类中，方
 * 便在 Proxy 实现类进行使用。
 * <p>
 * 方法前置通知是在方法执行前执行的通知，它的作用是在方法执行前执行一些操作，
 */

public interface MethodBeforeAdvice extends BeforeAdvice {


    /**
     * Callback before a given method is invoked.
     *
     * @param method method being invoked
     * @param args   arguments to the method
     * @param target target of the method invocation. May be <code>null</code>.
     * @throws Throwable if this object wishes to abort the call.
     *                   Any exception thrown will be returned to the caller if it'
     *                   s
     *                   allowed by the method signature. Otherwise the exception
     *                   will be wrapped as a runtime exception.
     */
    void before(Method method, Object[] args, Object target) throws Throwable;
}
